home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Big Mouth 8
/
Big_Mouth_The_08_1996_-_Side_B.d64
/
mille bourns
(
.txt
)
next >
Wrap
Commodore BASIC
|
2023-02-26
|
6KB
|
197 lines
100 rem f. covitz
110 poke53280,5:poke53281,11:poke53272,21:print"[147][155]":deffna(l)=2^(l-1):e=106
115 i=rnd(-ti)
120 dims(7),c%(e),t$(4,5),pl(1,3),h(1,7),t1%(4),t2%(4,5),tb(1)
130 data"out of gas","flat tire",accident,"speed limit(50)",stop
140 datagas,"spare tire",repairs,"end speed limit",roll,"extra tank"
150 data"permanent tire","driving ace",r,right-of-way,200,100,75,50,25
160 fori=1to4:forj=1to5:readt$(i,j):nextj,i
170 data18,56,60,106,4,7,10,14,19,25,31,37,43,57,58,59,60,60,61,65,77,87,97,107
180 b$=" "
190 fori=1to4:readt1%(i):nexti:fori=1to4:forj=1to5:readt2%(i,j):nextj,i
200 g=0:fori=1toe:c%(i)=i:nexti:s(0)=0:s(1)=0
210 print"shuffling...":gosub720:gosub800
220 fori=0to1:forj=0to3:pl(i,j)=0:nextj:tb(i)=9:nexti
230 fori=0to1:forj=1to6:cn=cn+1:h(i,j)=c%(cn):nextj,i
240 print"":fora=1to6:c=h(1,a):gosub760:printtab(3);n$:nexta
250 p=1:cn=cn+1:ifcn>ethens=s+1:ifs>6thenn$="nobody":goto1680
260 ifs>0then300
270 c=c%(cn):h(1,0)=c:gosub760:print"";
280 printtab(3)left$(b$,13)
290 print"[145]";tab(3);n$
300 print"your move[146]"left$(b$,30)
310 if(pl(0,3)and8)andpl(0,2)>-1thenpl(0,2)=5:j=22:gosub2020:printtab(9);"roll "
320 print" play(p) or discard(d) which card? [157][157]";
330 getn$:ifn$>""goto330
340 getn$:ifn$<>"d"andn$<>"p"andn$<>" "thengosub2040:goto340
350 printn$;:ifn$=" "thenn$="d":n=s:print"[157]d"mid$(str$(s+1),2):goto410
360 getq$:ifq$=chr$(20)goto320
370 n=val(q$)-1:ifn>6orn<sthengosub2040:goto360
380 printq$;
390 getq$:ifq$=""thengosub2040:goto390
400 ifq$<>chr$(13)thenprint"[157] [157]";:goto360
410 print:ifn$="d"thengosub900:gosub880:goto440
420 gosub860
430 ifch=0theninput",ok y[157][157][157]";n$:goto300
440 print"":fora=0to3+s:print"";:nexta:printtab(3)left$(b$,18)
450 ifpl(1,0)=1000thenn$="you":goto1680
460 d$="play"
470 print"":fori=1to39:print" ";:nexti
480 print"thinking....":p=0:cn=cn+1
490 if(pl(1,3)and8)andpl(1,2)>-1thenpl(1,2)=5:j=16:gosub2020:printtab(9);"roll "
500 ifs=0thenh(0,0)=c%(cn)
510 hz=pl(0,2):ifhz>-1andpl(0,1)>-1then580
520 gosub1430:ifcfthenpl(0,3)=pl(0,3)+fna(m):pl(0,cf)=m:s(2)=s(2)+300
530 ifcfthens(4)=s(4)+100:goto700
540 ifsorpl(1,0)>790orpl(0,0)>790thengosub1630:ifsfthen700
550 gosub1390:ifchthenpl(0,ch)=m:goto700
560 ifpl(0,2)>-1then580
570 goto660
580 ifpl(0,2)<5then650
590 lm=201:ifpl(0,1)<0thenlm=51
600 iflm<200andpl(0,0)<900thengosub1370:ifchthenpl(0,1)=4:goto700
610 ch=0:d=0:fora=sto6:c=h(0,a):gosub760:b=val(n$)
620 ifb<lmand(b+pl(0,0)<1001)andb>dthend=b:n=a:ch=1
630 nexta:ifchthenpl(0,0)=pl(0,0)+d:goto700
640 goto660
650 gosub1480:ifchand(pl(0,2)>-1)thenpl(0,2)=5:goto700
660 ifpl(1,2)<0andpl(1,1)<0then690
670 gosub1300:ifch=1andpl(1,0)<950thenpl(1,1)=-4:goto700
680 ifch=2andpl(1,2)=5thenpl(1,2)=-m:goto700
690 gosub1500
700 gosub1740:ifpl(0,0)=1000thenn$="i":goto1680
710 gosub2030:goto250
720 cn=0:en=e+1:s=0
730 fori=2to5:s(i)=0:nexti
740 fori=1toe:r%=i+(en-i)*rnd(ti):t=c%(i):c%(i)=c%(r%):c%(r%)=t:rem
750 nexti:return
760 fori=1to4:forj=1to5
770 ifc>t1%(i)thenj=5:goto790
780 ifc<t2%(i,j)thenn$=t$(i,j):k=i:l=j:i=4:j=5
790 nextj,i:return
800 print"[147] your hand [146]";spc(13);"discard[146]"
810 fori=0to6:printi+1:nexti:print:print"your pile"
820 print"distance[141]speed [141]battle [141]safety "
830 print:print"my pile"
840 print"distance[141]speed [141]battle [141]safety "
850 print"";:return
860 c=h(1,n):gosub760:gosub930:p=1
870 ifch=0thenprint""ms$;:return
880 gosub920:j=n+5+6*(1-p):gosub2020:printtab(3)left$(b$,20)
890 print"[145]"tab(3):c=h(p,n):gosub760:printn$:return
900 c=h(p,n):gosub760
910 print""tab(23)n$left$(b$,16-len(n$)):print"":return
920 h(p,n)=h(p,s):return
930 p=1:ms$="":onkgoto1010,1090,1210,940
940 d=val(n$):ifpl(1,0)+d>1000thenms$="you have exceeded 1000"
950 ifpl(1,1)=-4andd>50thenms$="you have a "+t$(1,4)
960 ifpl(1,2)<5thenms$="you don't have a roll card"
970 ifpl(1,2)<0thenms$="you have a hazard"
980 ifms$<>""thench=0:return
990 pl(1,0)=pl(1,0)+d:ch=1
1000 n$=str$(pl(1,0)):j=14:goto1190
1010 ifl<>4andpl(0,2)<5thenms$="i don't have a roll card"
1020 ifl<>4andpl(0,2)<0thenms$="i already have a hazard"
1030 ifl=4andpl(0,1)<0thenms$="i have a speed limit"
1040 ifl=4and(pl(0,3)and16)thenms$="i have "+t$(3,5)
1050 ifpl(0,3)andfna(l)thenms$="ha!-i have the safety"
1060 ifms$<>""thench=0:return
1070 ifl<>4thenpl(0,2)=-l:j=22:goto1190
1080 ch=1:pl(0,1)=-4:j=21:goto1190
1090 ifl<>5then1140
1100 ifpl(1,2)=5thenms$="you have a roll card"
1110 ifpl(1,2)<0thenms$="you have a hazard":ifpl(1,2)=-5thenms$=""
1120 ifms$<>""thench=0:return
1130 pl(1,2)=5:goto1180
1140 ifl=4andpl(1,1)=-4thenpl(p,1)=4:j=15:goto1190
1150 ifpl(1,2)<>-lthenms$="you don't need to do that"
1160 ifms$<>""thench=0:return
1170 pl(p,2)=l
1180 j=16
1190 gosub2020:printtab(9)n$" "
1200 ch=1:return
1210 p=1:cf=0:ifpl(1,2)=-lthenpl(1,2)=l:cf=1
1220 ifl=5andpl(1,1)<0thencf=1
1230 s(5)=s(5)+100:pl(1,3)=pl(1,3)+fna(l)
1240 ifcfthenprint"coup fouree":s(3)=s(3)+300:gosub2030
1250 ifl=5thenpl(p,3)=pl(p,3)+8:pl(p,1)=4:j=21-6*p:gosub2020:printtab(9)t$(2,4)
1260 j=23-6*p:gosub2020:printtab(tb(p))""n$""
1270 tb(p)=tb(p)+15:iftb(p)>30andtb(p)<49thentb(p)=49
1280 ifcfandpl(p,2)=lthenj=22-6*p:gosub2020:printtab(9)t$(2,l)" "
1290 cf=0:ch=1:return
1300 ch=0:fora=sto6:c=h(0,a):gosub760
1310 ifk<>1then1360
1320 ifl=4andpl(1,1)>-1thench=1:m=l:n=a
1330 ifl<>4andpl(1,2)>0thench=2:m=l:n=a
1340 iffna(l)andpl(1,3)thench=0
1350 ifchthena=6
1360 nexta:return
1370 ch=0:fora=sto6:c=h(0,a):gosub760:ifk=2andl=4thench=1:n=a:a=6
1380 nexta:return
1390 ch=0:fora=sto6:c=h(0,a):gosub760
1400 ifk=2andl=-hzthench=2:m=l:n=a:a=6:goto1420
1410 ifk=2andl=4andpl(0,1)=-4thench=1:m=l:n=a
1420 nexta:return
1430 sf=0:cf=0:fora=sto6:c=h(0,a):gosub760:ifk<>3then1470
1440 ifpl(0,1)<0andl=5thencf=1
1450 sf=sf-8*(l=5)+fna(l):m=l:n=a:ifl=-hzthencf=2
1460 ifcfthena=6
1470 nexta:return
1480 ch=0:fora=sto6:c=h(0,a):gosub760:ifk=2andl=5thench=1:n=a:a=6
1490 nexta:return
1500 d$="discard":fora=sto6:c=h(0,a):gosub760
1510 ifk=1and(pl(1,3)andfna(l))then1670
1520 ifk=1andl=4andpl(1,0)>949then1670
1530 ifk=2and(fna(l)and(pl(0,3)orsf))then1670
1540 ifk=4andval(n$)>(1000-pl(0,0))then1670
1550 nexta
1560 fora=sto6:c=h(0,a):gosub760
1570 ifk=4andval(n$)andval(n$)<76then1670
1580 nexta
1590 fora=sto6:c=h(0,a):gosub760
1600 ifk=1and(fna(l)and(pl(0,3)orsf)=0)then1670
1610 ifk=2andl<5and(pl(1,3)andfna(l)=0)then1670
1620 nexta
1630 gosub1430
1640 ifsfthenpl(0,3)=pl(0,3)+fna(m):d$="play[146]":s(4)=s(4)+100:return
1650 n=int((7-s)*rnd(1))+s:ifsthenreturn:c=h(0,n):gosub760:ifval(n$)>100goto1650
1660 return
1670 n=a:a=6:nexta:return
1680 print" "n$" reached 1000 miles!!...":printb$
1690 input"[145]next round y[157][157][157]";n$
1700 gosub1860:ifg>4orleft$(n$,1)="n"thenprint"game over":goto1720
1710 input"ok y[157][157][157]";n$:goto210
1720 input"new game y[157][157][157]";n$:ifn$="y"thenrun
1730 end
1740 p=0:c=h(0,n):gosub760
1750 print"my "d$"[146] is "n$;:fori=1to32-len(d$+n$):print" ";:nexti
1760 print:p=0
1770 iflen(d$)>6thengosub910:gosub920:return
1780 ifcfthenprint"coup fouree"
1790 print"":ifk=4thenn$=str$(pl(0,0)):j=20
1800 ch=0:ifk=3thenj=23:ch=1
1810 ifk=2thenj=22:ifl=4thenj=21
1820 ifk=1thenj=16:ifl=4thenj=15
1830 gosub2020:printtab(9);
1840 ifchthengosub1250:gosub920:return
1850 printn$" ":gosub920:return
1860 g=g+1:print"[147]scores for round"g
1870 print:printtab(17)"me"tab(26)"you"
1880 print"distance"tab(15)pl(0,0)tab(25)pl(1,0)
1890 s(6)=pl(0,0):s(7)=pl(1,0)
1900 print"complete trip"
1910 ifs(6)=1000thenprinttab(15)"[145] 400":s(6)=s(6)+400
1920 ifs(7)=1000thenprinttab(25)"[145] 400":s(7)=s(7)+400
1930 print"coups fourees"tab(15)s(2)tab(25)s(3)
1940 s(6)=s(6)+s(2):s(7)=s(7)+s(3)
1950 print"safeties"tab(15)s(4)tab(25)s(5)
1960 s(6)=s(6)+s(4):s(7)=s(7)+s(5)
1970 print"shut out":ifpl(1,0)=0thenprinttab(15)"[145] 500":s(6)=s(6)+500
1980 ifpl(0,0)=0thenprinttab(25)"[145] 500":s(7)=s(7)+500
1990 print:print"round"g"total"tab(15)s(6)tab(25)s(7)
2000 s(0)=s(0)+s(6):s(1)=s(1)+s(7)
2010 print:print"grand total"tab(15)s(0)tab(25)s(1):return
2020 print"";:fori=1toj:print:nexti:return
2030 fori=0to800:nexti:return
2040 print"[166][157]";:i=fre(0):print" [157]";:return